If the background is already removed, or we're trying to remove bad content,
this is probably a bug in content accounting, so let us crash so we can fix
the bugs.
https://bugzilla.gnome.org/show_bug.cgi?id=719803
_removeContent: function(contentList, content) {
let index = contentList.indexOf(content);
-
- if (index >= 0)
- contentList.splice(index, 1);
+ if (index < 0)
+ throw new Error("Trying to remove invalid content: " + content);
+ contentList.splice(index, 1);
},
removePatternContent: function(content) {